{if empty($_W['isajax'])}
{template 'common/top'}
{/if}
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <div class="base_topBar ">
        <div class="base_explain">
            <span id="toolbar_title">编辑卡片知识</span>
            <div class="warn_info_box clearfix">
            </div>
        </div>
        <div class="base_topBar_right">
            <div class="operate_items clearfix">
                <div class="user_feedBack operate_item">
                    <a href="#" class="userFeedbackClick">
                        用户反馈
                    </a>
                </div>
            </div>
        </div>
    </div>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <!-- right column -->
            <div class="col-xs-4 col-sm-8 col-md-12">
                <!-- Horizontal Form -->
                <div class="box box-info">
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form action="" method="post"  class="form-horizontal" enctype="multipart/form-data">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-2 col-md-2 control-label">分类</label>
                                <div class="col-xs-12 col-sm-10 col-md-10">
                                    <select name="category_id" id="" class="form-control">
                                        <option value="0">请选择</option>
                                        {loop $category $option}
                                        <option value="{$option['id']}" {if $item['category_id']==$option['id']}selected{/if}>{$option['name']}</option>
                                        {/loop}
                                    </select>
                                    <span class="help-block"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-2 col-md-2 control-label">标题</label>
                                <div class="col-xs-12 col-sm-10 col-md-10">
                                    <input type="text" placeholder="" name="title" value="{$item['title']}" class="form-control"/>
                                    <span class="help-block"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-2 col-md-2 control-label">内容</label>
                                <div class="col-xs-12 col-sm-10 col-md-10">
                                    <textarea name="content"  cols="30" rows="10" placeholder="请输入内容" class="form-control">{$item['content']}</textarea>
                                    <span class="help-block"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-2 col-md-2 control-label">排序</label>
                                <div class="col-xs-12 col-sm-10 col-md-10">
                                    <input type="text" placeholder="数值越大越靠前" name="sort" value="{$item['sort']}" class="form-control"/>
                                    <span class="help-block">数值越大越靠前</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-2 col-md-2 control-label">显示</label>
                                <div class="col-xs-12 col-sm-10 col-md-10">
                                    <label class="radio-inline">
                                        <input type="radio" name="status" value="1" {if $item['status']==1 || !isset($item['status'])}checked="checked"{/if}> 是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="status" value="0" {if $item['status']==0 && isset($item['status'])}checked="checked"{/if}> 否
                                    </label>
                                    <span class="help-block"></span>
                                </div>
                            </div>
                        </div>
                        <div class="box-footer">
                            <input type="hidden" name="token" value="{$_W['token']}" />
                            <button type="submit" class="waves-effect waves-light btnMid btnBlue completeBtn">写好了</button>
                        </div>
                    </form>
                </div>
                <!-- /.box -->
            </div>
            <!--/.col (right) -->
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
{if empty($_W['isajax'])}
{template 'common/foot'}
<script type="text/javascript">
    $(".urlitem").click(function(){
        $("#link").val($(this).data('url'));
    });
</script>
{/if}